unit startmenu;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Menus;

type
  Tstartpanel = class(TForm)
    Button1: TButton;
    Bevel1: TBevel;
    Bevel2: TBevel;
    Bevel3: TBevel;
    rightmenustartpanel: TPopupMenu;
    PlaceatTop1: TMenuItem;
    PlaceatBottom1: TMenuItem;
    N2: TMenuItem;
    ExitBetatestingonly1: TMenuItem;
    N1: TMenuItem;
    About1: TMenuItem;
    procedure FormCreate(Sender: TObject);
    procedure PlaceatTop1Click(Sender: TObject);
    procedure PlaceatBottom1Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure ExitBetatestingonly1Click(Sender: TObject);
    procedure About1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure WMNCHitTest(var M: TWMNCHitTest); message wm_NCHitTest;
  end;

var
  startpanel: Tstartpanel;

implementation

uses desktop, aboutwindow;

{$R *.dfm}

procedure Tstartpanel.WMNCHitTest(var M: TWMNCHitTest);
 begin
   inherited;
   if  M.Result = htClient then
     M.Result := htCaption;
 end;

procedure Tstartpanel.FormCreate(Sender: TObject);
begin
  startpanel.left := 0;
  startpanel.Top := Screen.Height - 33;
end;

procedure Tstartpanel.PlaceatTop1Click(Sender: TObject);
begin
startpanel.Top := 0;
end;

procedure Tstartpanel.PlaceatBottom1Click(Sender: TObject);
begin
  startpanel.Top := screen.Height - startpanel.Height;
end;

procedure Tstartpanel.Button1Click(Sender: TObject);
begin
dGS.PopupMenu1.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y);
end;

procedure Tstartpanel.ExitBetatestingonly1Click(Sender: TObject);
begin
dGS.Close;
end;

procedure Tstartpanel.About1Click(Sender: TObject);
begin
aboutform.ShowModal;
end;

end.
 